function FirstNotRepeatingChar(str)
{
    // write code here
    var dic = {}
    for(var i of str){
      if(dic[i] !== undefined){
        dic[i] = false
      }else{
        dic[i] = true
      }
    }
    for(let key in dic){
      if(dic[key]){
        return str.indexOf(key)
      }
    }
    return -1
}
module.exports = {
    FirstNotRepeatingChar : FirstNotRepeatingChar
};